#Dockfile
FROM registry.cn-qingdao.aliyuncs.com/hahahahaha/centos-java:0.1
MAINTAINER ZhangKaiQiang<13054626536@163.com>
WORKDIR /usr/local
#容器运行后默认执行的命令
ENTRYPOINT ["sh","-c","/usr/local/shell/start.sh"]


#构建镜像
docker build -t mygraduate .

#启动容器,根据构建的镜像启动三个容器
docker run -d --name mygraduate1 -p 8080:8080
-v /graduate/jar:/usr/local
-v /graduate/shell:/usr/local/shell
-v /graduate/logs:/usr/local/logs
-v /graduate/studentfile:/graduate/studentfile ac7da273a017


docker run -d --name mygraduate2 -p 8081:8080
-v /graduate/jar:/usr/local
-v /graduate/shell:/usr/local/shell
-v /graduate/logs:/usr/local/logs
-v /graduate/studentfile:/graduate/studentfile ac7da273a017


docker run -d --name mygraduate3 -p 8082:8080
-v /graduate/jar:/usr/local
-v /graduate/shell:/usr/local/shell
-v /graduate/logs:/usr/local/logs
-v /graduate/studentfile:/graduate/studentfile ac7da273a017


# start.sh,为了后序jar包升级的便利
java -jar /usr/local/graduate-0.0.1-SNAPSHOT.jar
